Skip to content

Conversation

@lindig
Copy link
Contributor

@lindig lindig commented Jun 28, 2017

This is a backport from the master branch. The main difference is that we don't
increment the API version because that would make it equal to the API version of
another release. It's also worth noting this commit replaces an existing overly
restrictive check with this new one.

This commit modifies checks before a host can join a pool.
The joining host compares its set of updates with the updates on each
host in the pool. These sets must be equal for the host being able to join
the pool. The comparison only considers updates that are marked as
enforce-homogeneity="true" in their update.xml definition -- see below.
This attribute is new. The absence of the enforce-homogeneity attribute
in an update defaults to enforce-homogeneity=false. This makes the code
backward compatible with updates that don't have this annotation.

Typically, code updates will have enforce-homogeneity=true but driver
updates will have enforce-homogeneity=false such that hosts in the pool
can have different sets of drivers but have the same code updates.

The implementation changes the datamodel: class pool_update gets a new
field enforce_homogeneity. Note: the API version is not incremented
because this would make the API version equal to the one of another
release. We are taking a risk here.

<update after-apply-guidance="restartHost" build-number="XS71ECU1/58"
  control="control-XS71ECU1" enforce-homogeneity="true"
  installation-size="566138764" key="RPM-GPG-KEY-XS-Eng-Test.pub"
  name-label="XS71ECU1" uuid="5eea06f3-4990-497d-af7a-d0bba6f9f96a"
  version="1.0">

  <name-description>Cumulative Update 1 (CU-1)</name-description>
  <rollsup name-label="XS71E001" uuid="fc438a32-0214-4193-8676-9feb121c6997"/>
  <rollsup name-label="XS71E002" uuid="9768c0f1-d111-4ee4-ac85-fe9ee37b5726"/>
  <rollsup name-label="XS71E003" uuid="b80ea320-f9ae-414c-a14d-781861b5c0ac"/>
  <rollsup name-label="XS71E004" uuid="a4ebb0e4-bfcb-48da-8b42-4673d3111d29"/>
  <rollsup name-label="XS71E005" uuid="d2df0c4f-eaf6-4778-a754-19a8b7739b5c"/>
  <rollsup name-label="XS71E006" uuid="008f1b43-8f02-40a4-8475-28f15dbfd1fc"/>
  <rollsup name-label="XS71E007" uuid="04bcb1f7-3bdc-440d-9cac-9d2a87746b24"/>
  <rollsup name-label="XS71E008" uuid="e3c382d7-dba5-4809-9901-d0d15ee02ad9"/>
</update>

Signed-off-by: Christian Lindig [email protected]

…ates

This commit modifies checks before a host can join a pool.
The joining host compares its set of updates with the updates on each
host in the pool.  These sets must be equal for the host being able to join
the pool.  The comparison only considers updates that are marked as
enforce-homogeneity="true" in their update.xml definition -- see below.
This attribute is new. The absence of the enforce-homogeneity attribute
in an update defaults to enforce-homogeneity=false. This makes the code
backward compatible with updates that don't have this annotation.

Typically, code updates will have enforce-homogeneity=true but driver
updates will have enforce-homogeneity=false such that hosts in the pool
can have different sets of drivers but have the same code updates.

The implementation changes the datamodel: class pool_update gets a new
field enforce_homogeneity. Note: the API version is not incremented
because this would make the API version equal to the one of another
release. We are taking a risk here.

<update after-apply-guidance="restartHost" build-number="XS71ECU1/58"
  control="control-XS71ECU1" enforce-homogeneity="true"
  installation-size="566138764" key="RPM-GPG-KEY-XS-Eng-Test.pub"
  name-label="XS71ECU1" uuid="5eea06f3-4990-497d-af7a-d0bba6f9f96a"
  version="1.0">

  <name-description>Cumulative Update 1 (CU-1)</name-description>
  <rollsup name-label="XS71E001" uuid="fc438a32-0214-4193-8676-9feb121c6997"/>
  <rollsup name-label="XS71E002" uuid="9768c0f1-d111-4ee4-ac85-fe9ee37b5726"/>
  <rollsup name-label="XS71E003" uuid="b80ea320-f9ae-414c-a14d-781861b5c0ac"/>
  <rollsup name-label="XS71E004" uuid="a4ebb0e4-bfcb-48da-8b42-4673d3111d29"/>
  <rollsup name-label="XS71E005" uuid="d2df0c4f-eaf6-4778-a754-19a8b7739b5c"/>
  <rollsup name-label="XS71E006" uuid="008f1b43-8f02-40a4-8475-28f15dbfd1fc"/>
  <rollsup name-label="XS71E007" uuid="04bcb1f7-3bdc-440d-9cac-9d2a87746b24"/>
  <rollsup name-label="XS71E008" uuid="e3c382d7-dba5-4809-9901-d0d15ee02ad9"/>
</update>

modified:   ocaml/client_records/records.ml
modified:   ocaml/idl/api_errors.ml
modified:   ocaml/idl/datamodel.ml
modified:   ocaml/idl/datamodel_types.ml
modified:   ocaml/test/test_common.ml
modified:   ocaml/xapi/xapi_globs.ml
modified:   ocaml/xapi/xapi_pool.ml
modified:   ocaml/xapi/xapi_pool_update.ml

Signed-off-by: Christian Lindig <[email protected]>
Copy link
Contributor

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to bring this in and test it!

@lindig lindig merged commit d17d17f into xapi-project:1.14-ppx Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants